package com.aspose.cells;

class zuj implements zui {
   public void a(zn var1, com.aspose.cells.b.a.b.zm var2, com.aspose.cells.b.a.b.a.zd var3, com.aspose.cells.b.a.b.a.zd var4, float var5, float var6, float var7, float var8, float var9, float var10) {
      var1.a(var2, var5, var6, var7, var8, var9, var10);
   }

   public void a(zn var1, com.aspose.cells.b.a.b.zm var2, com.aspose.cells.b.a.b.a.zd var3, com.aspose.cells.b.a.b.a.zd var4, com.aspose.cells.b.a.b.zo[] var5, int var6, int var7, float var8) {
      var1.a(var2, var5, var6, var7, var8);
   }

   public void a(zn var1, com.aspose.cells.b.a.b.zm var2, com.aspose.cells.b.a.b.a.zd var3, com.aspose.cells.b.a.b.a.zd var4, float var5, float var6, float var7, float var8) {
      com.aspose.cells.b.a.b.a.ze var9 = this.a(var3, var2);
      com.aspose.cells.b.a.b.a.ze var10 = this.a(var4, var2);
      com.aspose.cells.b.a.b.a.ze var11 = this.b(var3, var2);
      com.aspose.cells.b.a.b.a.ze var12 = this.b(var4, var2);
      double var13 = Math.atan2((double)(var8 - var6), (double)(var7 - var5));
      com.aspose.cells.b.a.b.zo var15 = new com.aspose.cells.b.a.b.zo(var5, var6);
      com.aspose.cells.b.a.b.zo var16 = new com.aspose.cells.b.a.b.zo(var7, var8);
      this.a(var1, var2, var9, var10, var11, var12, var13, var13, var15, var16);
      var1.a(var2, var15, var16);
   }

   public void a(zn var1, com.aspose.cells.b.a.b.zm var2, com.aspose.cells.b.a.b.a.zd var3, com.aspose.cells.b.a.b.a.zd var4, com.aspose.cells.b.a.b.a.ze var5) {
      if (var5 != null) {
         com.aspose.cells.b.a.b.zo[] var6 = var5.c();
         byte[] var7 = var5.d();
         if (var6 != null && var6.length >= 2) {
            com.aspose.cells.b.a.b.a.ze var8 = this.a(var3, var2);
            com.aspose.cells.b.a.b.a.ze var9 = this.a(var4, var2);
            com.aspose.cells.b.a.b.a.ze var10 = this.b(var3, var2);
            com.aspose.cells.b.a.b.a.ze var11 = this.b(var4, var2);
            double var12 = 0.0D;
            double var14 = 0.0D;
            if (var6.length == 2) {
               var12 = var14 = Math.atan2((double)(var6[1].e() - var6[0].e()), (double)(var6[1].d() - var6[0].d()));
            } else {
               int var16 = var6.length - 1;
               var12 = Math.atan2((double)(var6[1].e() - var6[0].e()), (double)(var6[1].d() - var6[0].d()));
               var14 = Math.atan2((double)(var6[var16].e() - var6[var16 - 1].e()), (double)(var6[var16].d() - var6[var16 - 1].d()));
            }

            com.aspose.cells.b.a.b.zo var19 = var6[0];
            com.aspose.cells.b.a.b.zo var17 = var6[var6.length - 1];
            this.a(var1, var2, var8, var9, var10, var11, var12, var14, var19, var17);
            com.aspose.cells.b.a.b.a.ze var18 = new com.aspose.cells.b.a.b.a.ze(var6, var7);
            var1.a(var2, var18);
         }
      }
   }

   private void a(zn var1, com.aspose.cells.b.a.b.zm var2, com.aspose.cells.b.a.b.a.ze var3, com.aspose.cells.b.a.b.a.ze var4, com.aspose.cells.b.a.b.a.ze var5, com.aspose.cells.b.a.b.a.ze var6, double var7, double var9, com.aspose.cells.b.a.b.zo var11, com.aspose.cells.b.a.b.zo var12) {
      double var13 = var7 / 0.017453292519943295D;
      double var15 = var9 / 0.017453292519943295D;
      float var17 = 0.0F;
      float var18 = 0.0F;
      com.aspose.cells.b.a.b.a.zi var19 = var1.k();
      float var20 = var2.p();
      if (var2.p() <= 1.0F) {
         var20 = 1.0F;
      }

      float var21;
      com.aspose.cells.b.a.b.a.zi var22;
      float var23;
      if (var4 != null) {
         var21 = 1000.0F;
         var22 = new com.aspose.cells.b.a.b.a.zi();
         var22.a((float)(-90.0D + var15));
         var22.a(var20 * var21, var20 * var21);
         var4.a(var22);
         var17 = var2.p();
         var1.a(1.0F / var21, 1.0F / var21);
         var1.b(var12.d() * var21, var12.e() * var21);
         var23 = var2.p();
         var2.b(1.0F);
         if (var15 == 0.0D) {
            var1.a(var2, var4);
         }

         var1.a((com.aspose.cells.b.a.b.zc)(new com.aspose.cells.b.a.b.zu(var2.c())), (com.aspose.cells.b.a.b.a.ze)var4);
         var2.b(var23);
         var1.b(-var12.d() * var21, -var12.e() * var21);
         var1.a(var21, var21);
      }

      if (var3 != null) {
         var21 = 1000.0F;
         var22 = new com.aspose.cells.b.a.b.a.zi();
         var22.a(var20 * var21, var20 * var21);
         var22.a((float)(90.0D + var13));
         var3.a(var22);
         var18 = var2.p();
         var1.a(1.0F / var21, 1.0F / var21);
         var1.b(var11.d() * var21, var11.e() * var21);
         var23 = var2.p();
         var2.b(1.0F);
         if (var13 == 0.0D) {
            var1.a(var2, var3);
         }

         var1.a((com.aspose.cells.b.a.b.zc)(new com.aspose.cells.b.a.b.zu(var2.c())), (com.aspose.cells.b.a.b.a.ze)var3);
         var2.b(var23);
         var1.b(-var11.d() * var21, -var11.e() * var21);
         var1.a(var21, var21);
      }

      com.aspose.cells.b.a.b.a.zi var24;
      if (var6 != null) {
         var24 = new com.aspose.cells.b.a.b.a.zi();
         var24.a(var20, var20);
         var24.a((float)(-90.0D + var15));
         var6.a(var24);
         var17 = var2.p();
         var1.b(var12.d(), var12.e());
         var1.a(var2, var6);
         var1.b(-var12.d(), -var12.e());
      }

      if (var5 != null) {
         var24 = new com.aspose.cells.b.a.b.a.zi();
         var24.a(var20, var20);
         var24.a((float)(90.0D + var13));
         var5.a(var24);
         var18 = var2.p();
         var1.b(var11.d(), var11.e());
         var1.a(var2, var5);
         var1.b(-var11.d(), -var11.e());
      }

      var11.a((float)((double)var11.d() + (double)var18 * Math.cos(var7)));
      var11.b((float)((double)var11.e() + (double)var18 * Math.sin(var7)));
      var12.a((float)((double)var12.d() - (double)var17 * Math.cos(var9)));
      var12.b((float)((double)var12.e() - (double)var17 * Math.sin(var9)));
   }

   private com.aspose.cells.b.a.b.a.ze a(com.aspose.cells.b.a.b.a.zd var1, com.aspose.cells.b.a.b.zm var2) {
      if (var1 == null) {
         return null;
      } else if (var1 instanceof com.aspose.cells.b.a.b.a.za) {
         com.aspose.cells.b.a.b.a.za var3 = (com.aspose.cells.b.a.b.a.za)var1;
         if (var3.c()) {
            com.aspose.cells.b.a.b.a.ze var4 = new com.aspose.cells.b.a.b.a.ze();
            com.aspose.cells.b.a.b.zo[] var5;
            if (var3.d() == 0.0F) {
               var5 = new com.aspose.cells.b.a.b.zo[]{new com.aspose.cells.b.a.b.zo(-var3.a() / 2.0F, -var3.b()), new com.aspose.cells.b.a.b.zo(var3.a() / 2.0F, -var3.b()), new com.aspose.cells.b.a.b.zo(0.0F, 0.0F)};
               var4.b(var5);
            } else {
               var5 = new com.aspose.cells.b.a.b.zo[5];
               double var6 = Math.atan2((double)(var3.a() / 2.0F), (double)var3.b());
               double var8 = ((double)(var3.a() / 2.0F) - 0.5D) / Math.tan(var6);
               double var10 = var8 * (double)var3.d() / (double)var3.b();
               var5[0] = new com.aspose.cells.b.a.b.zo(-var3.a() / 2.0F, -var3.b());
               var5[1] = new com.aspose.cells.b.a.b.zo(-0.5F, (float)((double)(-var3.b()) + var10));
               var5[2] = new com.aspose.cells.b.a.b.zo(0.5F, (float)((double)(-var3.b()) + var10));
               var5[3] = new com.aspose.cells.b.a.b.zo(var3.a() / 2.0F, -var3.b());
               var5[4] = new com.aspose.cells.b.a.b.zo(0.0F, 0.0F);
               var4.b(var5);
            }

            if (var2.p() <= 1.0F) {
               var4.a(new com.aspose.cells.b.a.b.a.zi(2.0F, 0.0F, 0.0F, 2.0F, 0.0F, 0.0F));
            }

            return var4;
         } else {
            return null;
         }
      } else {
         return var1.e();
      }
   }

   private com.aspose.cells.b.a.b.a.ze b(com.aspose.cells.b.a.b.a.zd var1, com.aspose.cells.b.a.b.zm var2) {
      if (var1 == null) {
         return null;
      } else if (var1 instanceof com.aspose.cells.b.a.b.a.za) {
         com.aspose.cells.b.a.b.a.za var3 = (com.aspose.cells.b.a.b.a.za)var1;
         if (var3.c()) {
            return null;
         } else {
            com.aspose.cells.b.a.b.a.ze var4 = new com.aspose.cells.b.a.b.a.ze();
            var4.a(new com.aspose.cells.b.a.b.zo(var3.a() / 2.0F, -var3.b()), new com.aspose.cells.b.a.b.zo(0.0F, 0.0F));
            var4.a(new com.aspose.cells.b.a.b.zo(-var3.a() / 2.0F, -var3.b()), new com.aspose.cells.b.a.b.zo(0.0F, 0.0F));
            if (var2.p() <= 1.0F) {
               var4.a(new com.aspose.cells.b.a.b.a.zi(2.0F, 0.0F, 0.0F, 2.0F, 0.0F, 0.0F));
            }

            return var4;
         }
      } else {
         return var1.f();
      }
   }
}
